const getters = {
  // sidebar 和 device 要保留
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // token 的快捷访问方式
  token: state => state.user.token,
  // 用户的名字和头像
  name: state => state.user.info.username,
  avatar: state => state.user.info.staffPhoto,
  // 可选链操作符
  POINTS: state => state.user.info?.roles?.points
}
export default getters
